package com.liull.netty.nio.net.block;

import java.io.IOException;
import java.net.InetSocketAddress;
import java.nio.channels.SocketChannel;
import java.nio.charset.Charset;

/**
 * @Author: liull
 * @Description:
 * @Date: Created in 21:56 2021/7/22
 * @Modified By:
 */
public class Client {
    public static void main(String[] args) throws IOException {
        final SocketChannel channel = SocketChannel.open();
        channel.connect(new InetSocketAddress("127.0.0.1", 4567));
        // channel.write(Charset.defaultCharset().encode("hi"))
        channel.write(Charset.defaultCharset().encode("0123456789abcdef1\n2222\n"));
        System.in.read();
    }
}
